// 导入组件
const index = () => import("./../views/account/index.vue");
// 登录
const login = () => import("./../views/account/login.vue");
// 注册
const register = () => import("./../views/account/register.vue");

//主页面
const main = () => import("./../views/main/main.vue");

const mainIndex = () => import("./../views/main/main-index.vue");
const my = () => import("./../views/main/my/index");
// 行情
const market = () => import("./../views/main/market/index");


// 导入后台界面
const back = () => import("./../views/back/back.vue");
const backIndex = () => import("./../views/back/index.vue");
const user = () => import("./../views/back/user/index.vue");

export default [
    {
        path: "/",
        component: index,
        children: [
            {
                path: "",
                redirect: "login",
            },
            {
                path: "login",
                component: login,
                meta: {
                    title: "登录",
                },
            },
            {
                path: "register",
                component: register,
                meta: {
                    title: "注册",
                },
            },

        ],
    },
    {
        path: "/main",
        component: main,
        meta: {
            title: "股票模拟主界面",
        },
        // main/mainIndex
        children: [
            {
                path: "",
                redirect: "mainIndex",
            },
            {
                path: "mainIndex",
                component: mainIndex,
                meta: {
                    title: "首页"
                }

            },
            {
                path: "my",
                component: my
            },
            {
                path: "market",
                component: market
            }
        ]
    },
    {
        path: "/back",
        component: back,
        meta: {
            title: "后台管理",
        },
        children: [
            {
                path: "",
                redirect: "index",
            },
            {
                path: "index",
                component: backIndex,
            },
            {
                path: "user",
                component: user,
            },
        ],
    },
];
